#ifndef LUS_PRASE_H
#define LUS_PRASE_H

#include <QObject>
#include <QtXml>
#include <QtXml/QDomDocument>
#include <QTimer>


class lus_prase : public QObject
{
    Q_OBJECT

public:

    lus_prase();
    ~lus_prase();


    void init_prase(void);
    void lus_do_cmd(QString cmd);

    /*xml相关*/
    QFile xml_file;
    QDomDocument xml_document;


    QString	server_ip;
    QString server_port;

    uint8_t	down_status;

    QString my_group_id;
    QString my_variable_id;

    QString	client_version;
    QString server_version;

    QString lus_bd_info;

private:
    QTimer * timer_bdinfo;

    void check_dir(void);

    void read_conf(void);

    void cmd_change_gid(QString paral);

    void prase_init_msg(QDomElement rootnode);
    void prase_version_info(QDomElement rootnode);

    bool get_cpu_usage__(QString * info);

    bool get_disk_space__(QString * info);

signals:

    void lus_requst_send(QByteArray cmd);

private slots:
    void timer_send_dbinfo();
    void lus_exec_pack(QString fileName);

};

#endif // LUS_PRASE_H
